import request from '@/utils/request'

const getway = '/xmtsc-api'

// 获取用户基本资料
export function getAccountInfoById(data) {
  return request({
    url: getway+ '/api/accountInfo/getAccountInfoById',
    method: 'get',
    params: data
  })
}

export function getAccountById(data) {
  return request({
    url: getway+ '/api/account/getAccountById',
    method: 'post',
  })
}

// 修改用户基本资料
export function updateAccountInfoById(data) {
  return request({
    url: getway+ '/api/accountInfo/updateAccountInfoById',
    method: 'post',
    data: data
  })
}
// 获得用户简历列表
export function findResumes(data) {
  return request({
    url: getway+ '/api/resume/findResumes',
    method: 'post',
    data: data
  })
}

// 查询已收藏的职位
export function collectionposition(data) {
  return request({
    url: getway+ '/api/collectionposition/list',
    method: 'post',
    data: data
  })
}
//删除已收藏的职位
export function collectionposition_del(data) {
  return request({
    url: getway+ '/api/collectionposition/browsed/ids',
    method: 'post',
    data: data
  })
}

// 查询已关注的企业
export function CompanyAttentionHide(data) {
  return request({
    url: getway+ '/api/CompanyAttentionHide/list',
    method: 'post',
    data: data
  })
}

// 查询已申请的职位
export function appliedposition(data) {
  return request({
    url: getway+ '/api/appliedposition/list',
    method: 'post',
    data: data
  })
}

//删除已申请记录-批量
export function appliedposition_ids_del(data) {
  return request({
    url: getway+ '/api/appliedposition/ids',
    method: 'post',
    data: data
  })
}

//删除已申请记录
export function appliedposition_del(id) {
  return request({
    url: getway+ '/api/appliedposition/'+id,
    method: 'DELETE',
  })
}

//获取推荐政策
export function findRecommendPolicyList(data) {
  return request({
    url: getway+ '/api/policy/findRecommendPolicyList',
    method: 'POST',
    data: data
  })
}

//求职-个人中心，获得用户默认简历
export function default_resume(data) {
  return request({
    url: getway+ '/api/resume/getDefaultResume',
    method: 'POST',
    data: data
  })
}

//刷新简历
export function updateDefaultResume(data) {
  return request({
    url: getway+ '/api/resume/updateDefaultResume',
    method: 'POST',
    data: data
  })
}

// 查询已浏览的职位
export function browsedJobs(data) {
  return request({
    url: getway+ '/api/browsedposition/findList',
    method: 'POST',
    data: data
  })
}

//查询关注我的企业
export function followMeList(data) {
  return request({
    url: getway+ '/api/attentionposition/list',
    method: 'POST',
    data: data
  })
}

//删除关注我的记录-批量
export function followMeDelAll(data) {
  return request({
    url: getway+ '/api/attentionposition/attention/ids',
    method: 'post',
    data: data
  })
}

//删除关注我的记录
export function followMeDel(id) {
  return request({
    url: getway+ '/api/attentionposition/'+id,
    method: 'DELETE',
  })
}

//查询已浏览的职位
export function browsedList(data) {
  return request({
    url: getway+ '/api/browsedposition/findList',
    method: 'POST',
    data: data
  })
}

//查询已浏览的职位-批量
export function browsedDelAll(data) {
  return request({
    url: getway+ '/api/browsedposition/ids',
    method: 'post',
    data: data
  })
}

//查询已浏览的职位
export function browsedDel(id) {
  return request({
    url: getway+ '/api/browsedposition/'+id,
    method: 'DELETE',
  })
}

//消息中心
export function messagesList(data) {
  return request({
    url: getway+ '/api/messages/list',
    method: 'POST',
    data: data
  })
}

//消息中心-设为已读
export function messagesIds(data) {
  return request({
    url: getway+ '/api/messages/update/ids',
    method: 'POST',
    data: data
  })
}

//消息中心-删除批量
export function messagesDelAll(data) {
  return request({
    url: getway+ '/api/messages/delete/ids',
    method: 'POST',
    data: data
  })
}

//消息中心-删除批量
export function messagesDel(id) {
  return request({
    url: getway+ '/api/messages/delete/'+id,
    method: 'DELETE',
  })
}

// 账户-修改用户名
export function updateUserName(data) {
  return request({
    url: getway+ '/api/account/updateUserName',
    method: 'POST',
    data: data
  })
}

// 账户-修改用户密码
export function updateUserPassWord(data) {
  return request({
    url: getway+ '/api/account/updateUserPassWord',
    method: 'POST',
    data: data
  })
}
// 账户-重置密码
export function resetPwdPlus(data) {
  return request({
    url: getway+ '/api-user/users/resetPwdPlus',
    method: 'POST',
    data: data
  })
}
